package com.sophialex.health.record.common.dialog;

import java.util.List;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableColumn;

import com.sophialex.health.record.common.Messages;


public class DrugdicDlg extends CommonDlg {

	public DrugdicDlg(Shell parent, List list, String str) {
		super(parent);
		this.list = list;
		proStr = new String[] { "fmcode", "fzjcpy", "fmname", "fmalias", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
				"fstandard", "fkfunitname", "fzhjhdj", "fdqdj", "fkfkcsl" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
		filterPro = new String[] { "fmcode", "fzjcpy", "fzjcqt", "fzjcwb", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
				"fmname", "fmalias" }; //$NON-NLS-1$ //$NON-NLS-2$
		filterStr = str;
	}

	protected void createColumn() {
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_15);
			column.setWidth(70);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_16);
			column.setWidth(60);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_17);
			column.setWidth(120);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_18);
			column.setWidth(70);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_19);
			column.setWidth(100);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_20);
			column.setWidth(40);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_21);
			column.setWidth(65);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_22);
			column.setWidth(65);
		}
		{
			TableColumn column = new TableColumn(table, SWT.NONE);
			column.setText(Messages.DrugdicDlg_23);
			column.setWidth(65);
		}
		dbTable.setColumnProperties(proStr);
//		dbTable.exeDbTable(TdrugDic.class);

	}

	@Override
	protected void setSize() {
		shell.setSize(690, 500);
	}
}
